<{include file="admin/session.html"}>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="skin/admin/style/base.css" type="text/css" />
<link rel="stylesheet" href="skin/admin/style/main.css" type="text/css" />
<link rel="alternate stylesheet" type="text/css" href="skin/admin/Upimg/1024.css" />
<style type="text/css" media="all">
@import "skin/admin/Upimg/thickbox.css";
</style>
<script type="text/javascript" src="skin/admin/js/jquery.js"></script>
<script type="text/javascript" src="skin/admin/js/Validform.js"></script>
<script type="text/javascript">
$(function(){
	$(".registerform:last").Validform({
		tiptype:2,
		ajaxPost:true,
		callback:function(data){
			if(data.status=="y"){
				setTimeout(function(){
					$.Hidemsg(); //公用方法关闭信息提示框;
				},2000);
			}
		}
	});
})
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
 if (e.type == 'checkbox')
 e.checked = form.chkall.checked;
}
}
function delmessage(urls) {
if (confirm('数据将被删除，确定吗？')) {
document.pageForm.submit();
}
}
function delmessage2(urls) {
if (confirm('日志将被全部清空，确定吗？')) {
location.href='<{spUrl c=others a=delloginlog2 page=$pager.current_page}>';
}
}
</script>
<script src="skin/admin/Upimg/thickbox-compressed.js" type="text/javascript"></script>
<script src="skin/admin/Upimg/global.js" type="text/javascript"></script>
<title>管理系统</title>
</head>
<body>
<div class="rbox">
  <div class="ur_here">
    <div class="path fl" align="left">超级管理<span>-管理员登录日志</span></div>
</div>  
  <!--  内容列表   -->
<div class="rbox_list">
  <form name="pageForm" id="pageForm" action="<{spUrl c=others a=delloginlog page=$pager.current_page}>" method="post" onsubmit="return false;">
<input type="hidden" id="pageNo" name="pageNo" value=""/>  
    <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center">
      <tr align="center" bgcolor="#FAFAF1" height="25">
        <th width="9%"><input type="checkbox" name="chkall" value="on" onclick="CheckAll(this.form)" title="全选" /></th>
	    <th width="22%">登录管理员</th>
        <th width="28%">登录时间</th>
		<th width="16%">IP</th>
		<th width="25%">所在地区</th>
		</tr>
      <{if $results|@count gt 0}>
      <{foreach from=$results item=one}>
      <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="28" id="t<{$one.id}>">
        <td><input name="ids[]" type="checkbox" value="<{$one.id}>" /></td>
	  	<td><{$one.username}></td>
        <td><{$one.logtime}></td>
		<td><{$one.logip}></td>
		<td><{$one.logarea}></td>
		</tr>
      <{/foreach}>
      <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="28" >
        <td colspan="5" align="left">选中项：<input type="submit" name="button" id="button" value="批量删除选中项" onclick="delmessage()" />
        &nbsp;&nbsp;<input type="button" name="button" id="button" value="全部清空" onclick="delmessage2()" /></td>
      </tr>
      <{else}>
      <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';"height="28" >
      	<td colspan="7" align="center"><span style="color:#666">暂无数据...</span></td>
      </tr>
      <{/if}>
      <tr bgcolor="#FAFAF1">
        <td height="28" colspan="11" align="middle">
<!--传统分页开始-->
<{if $pager}> 
共有<{$pager.total_count}>条记录，当前<{$pager.current_page}>/<{$pager.total_page}>页：
<{if $pager.current_page != $pager.first_page}> 
<a href="<{spUrl c=others a=loginlog page=$pager.first_page}>">首页</a> | 
<a href="<{spUrl c=others a=loginlog page=$pager.prev_page}>">上一页</a> | 
<{/if}> 
<{foreach from=$pager.all_pages item=thepage}> 
<{if $thepage >= $pager.current_page-4 and $thepage <= $pager.current_page+4}> 
<{if $thepage != $pager.current_page}> 
<a href="<{spUrl c=others a=loginlog page=$thepage}>"><{$thepage}></a> 
<{else}> 
<span style="width:20px;padding:0 1px;"><{$thepage}></span> 
<{/if}> 
<{elseif $thepage <= 10 and $thepage >= $pager.current_page-4}>
<{if $thepage != $pager.current_page}> 
<a href="<{spUrl c=others a=loginlog page=$thepage}>"><{$thepage}></a> 
<{else}> 
<span style="width:20px;padding:0 1px;"><{$thepage}></span> 
<{/if}> 
<{elseif $thepage >= $pager.last_page-9 and $thepage <= $pager.current_page-4}>
<{if $thepage != $pager.current_page}> 
<a href="<{spUrl c=others a=loginlog page=$thepage}>"><{$thepage}></a> 
<{else}> 
<span style="width:20px;padding:0 1px;"><{$thepage}></span> 
<{/if}> 
<{else}>
<{/if}>
<{/foreach}> 
<{if $pager.current_page != $pager.last_page}> 
| 
<a href="<{spUrl c=others a=loginlog page=$pager.next_page}>">下一页</a> | 
<a href="<{spUrl c=others a=loginlog page=$pager.last_page}>">尾页</a> 
<{/if}> 
<{/if}>  
<!--传统分页结束-->        </td>
      </tr>
    </table>
</form>    
  </div>
</div>
</body>
</html>
